diff options
Diffstat (limited to 'src/routes/(app)/[username]/invoice/[hash]/+layout.server.js')
| -rw-r--r-- | src/routes/(app)/[username]/invoice/[hash]/+layout.server.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/routes/(app)/[username]/invoice/[hash]/+layout.server.js b/src/routes/(app)/[username]/invoice/[hash]/+layout.server.js index 7cf87e14..df22400a 100644 --- a/src/routes/(app)/[username]/invoice/[hash]/+layout.server.js +++ b/src/routes/(app)/[username]/invoice/[hash]/+layout.server.js @@ -9,6 +9,8 @@ export async function load({ depends, params, url, parent }) { let { hash } = params; let invoice = await get(`/invoice/${hash}`); + console.log("HI", invoice) + if (user && invoice.uid !== user.id && !url.pathname.includes('tip')) throw redirect(307, `/send/invoice/${hash}`); |
